#include "hikari.h"
#include <io.h>

HikariFileReader::HikariFileReader(wstring&path){
	std::string cpath=Utils::wstring_to_string(path);
	file=new RandomFileAccess(cpath.c_str());
	file->openFileWorReading();
	initChunkForReading();
}

HikariFileReader::~HikariFileReader(){
	if(file!=NULL){
		file->close();
		file=NULL;
	}
}

bool HikariFileReader::isFileExist(const wstring&path){
	return _access(Utils::wstring_to_string(path).c_str(),0)!=-1;
}